<template>
  <div class="app-container">
    <h2>子组件</h2>
    <p>子组件的玩具： {{  toy  }}</p>
    <p>父组件的车： {{  car  }}</p>
    <button @click="handleSendToy">发送给父组件</button>
  </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
let toy = ref('奥特曼')
let props = defineProps(['car', 'sendToy'])
function handleSendToy(){
  props.sendToy(toy)
}
</script>

<style lang="scss" scoped>
</style>
